package com.nursinghome.bean;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Salary {
    @ExcelProperty("工资id")
    private Long sid;//工资id 主键
    @ExcelProperty("发薪日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GTM+8")
    @DateTimeFormat("yyyy-MM-dd")
    @ColumnWidth(20)
    @NotNull(message = "日期不能为空")
    private Date payday;//发薪日期
    @ExcelProperty("提成")
    private BigDecimal comm;//提成
    @ExcelProperty("奖金")
    private BigDecimal prize;//奖金
    @ExcelProperty("考勤扣款")
    private BigDecimal cowa;//考勤扣款
    @ExcelProperty("五险一金")
    private BigDecimal fiaof;//五险一金
    @NotNull(message = "基本薪资不能为空")
    @ExcelProperty("基本薪资")
    private BigDecimal salary;//基本薪资
    @ExcelProperty("总工资")
    private BigDecimal sumnum;//总工资
    @ExcelProperty("员工编号")
    @NotNull(message = "员工不能为空")
    private Integer mid;//一对一外键
    @ExcelIgnore
    private MedicalStaff medicalStaff;//工资id 主键
}
